import axios from "./index.js";

export default {
  // 公共的接口
  async login(data) {
    return await axios({
      url: "/admin/login/index",
      method: "post",
      data,
    });
  },
  //修改密码
  async home_changePassword(data) {
    return await axios({
      url: "/admin/index/editPassword",
      method: "post",
      data,
    });
  },
  //基本资料
  async home_information(data) {
    return await axios({
      url: "/admin/index/editAdmin",
      method: "post",
      data,
    });
  },
  // 验证码接口
  async login_vercode() {
    return await axios({
      url: "/admin/login/captcha",
      method: "get",
    });
  },
  // 退出登录
  async logout() {
    return await axios({
      url: "/admin/login/out",
      method: "get",
    });
  },
  async uploadFile(data, callback) {
    return await axios({
      url: "/admin/ajax/upload",
      method: "post",
      data,
      onUploadProgress(e) {
        if (callback && e.lengthComputable) {
          callback(e);
        }
      },
    });
  },
  // 视频模板列表 type:tpllist video_type:videoadd  | type:tpllist video_type:tokeradd
  async getVideoTemplate(data) {
    return await axios({
      url: "/admin/ajax/key_auser",
      method: "post",
      data,
    });
  },

  async fatemplatelist(params) {
    return await axios({
      url: "/admin/ajax/fatemplatelist",
      method: "get",
      params,
    });
  },

  async getkey(params) {
    return await axios({
      url: "/admin/ajax/fatemplatelist",
      method: "get",
      params,
    });
  },
  // 获取某个视频模板 id=模板ID&type=video
  async getVideoTemplateById(params) {
    return await axios({
      url: "/admin/dsp.aivideo/add",
      method: "get",
      params,
    });
  },
  //修改密码
  async home_changePassword(data) {
    return await axios({
      url: "/admin/index/editPassword",
      method: "post",
      data,
    });
  },
  //基本资料
  async home_information(data) {
    return await axios({
      url: "/admin/index/editAdmin",
      method: "post",
      data,
    });
  },
  // ----------------------后台首页----------------------------
  //评论线索
  async htsy_getData(params) {
    return await axios({
      url: "/admin/dsp.customer/index",
      methods: "get",
      params,
    });
  },
  //用户信息
  async htsy_getUserData(params) {
    return await axios({
      url: "/admin/ajax/auth_login_data",
      methods: "get",
      params,
    });
  },

  //用户信息
  async htsy_is_auth(params) {
    return await axios({
      url: "/admin/ajax/is_auth",
      methods: "get",
      params,
    });
  },

  //触发次
  async trigger_word(params) {
    return await axios({
      url: "/admin/dsp.customer/trigger_word",
      methods: "get",
      params,
    });
  },

  //触发次添加
  async trigger_wordadd(params) {
    return await axios({
      url: "/admin/dsp.customer/trigger_word",
      methods: "post",
      params,
    });
  },

  // 铃铛接口
  async htsy_getMessage(data) {
    return await axios({
      url: "/admin/ajax/audit",
      method: "post",
      data,
    });
  },
  //置顶公告 系统公告
  async htsy_announcement(data) {
    return await axios({
      url: "/admin/ajax/home",
      method: "post",
      data,
    });
  },

  //  ---------------- 同城拓客 --------------------------------
  // 列表
  async tctk_getData(params) {
    return await axios({
      url: "/admin/dsp.qrcode/index",
      method: "get",
      params,
    });
  },
  // 添加
  async tctk_add(data) {
    return await axios({
      url: "/admin/dsp.qrcode/add",
      method: "post",
      data,
    });
  },
  // 修改
  async tctk_delete(data) {
    return await axios({
      url: "/admin/dsp.qrcode/delete",
      method: "post",
      data,
    });
  },
  // 编辑
  async tctk_getDetailById(params) {
    return await axios({
      url: "/admin/dsp.qrcode/edit",
      method: "get",
      params,
    });
  },
  // 编辑 提交
  async tctk_edit(data) {
    return await axios({
      url: "/admin/dsp.qrcode/edit",
      method: "post",
      data,
    });
  },
  // 选择@账号列表
  async tctk_getUserList(params) {
    return await axios({
      url: "/admin/ajax/key_auser",
      method: "get",
      params,
    });
  },
  async tctk_getList(data) {
    return await axios({
      url: "/admin/dsp.qrcode/atuser",
      method: "post",
      data,
    });
  },
  //删除
  async tctk_deletelist(data) {
    return await axios({
      url: "/admin/dsp.qrcode/atuser",
      method: "post",
      data,
    });
  },
  //  ---------------- 我的视频 --------------------------------
  // 列表
  async wdsp_getData(params) {
    return await axios({
      url: "/admin/dsp.video/index",
      method: "get",
      params,
    });
  },

  // 自动发布列表
  async automaticrelease(params) {
    return await axios({
      url: "/admin/dsp.autotask/index",
      method: "get",
      params,
    });
  },

  //修改状态
  async modify(data) {
    return await axios({
      url: "/admin/dsp.autotask/modify",
      method: "post",
      data,
    });
  },
  //自动发布获取地区
  async userkeydiqu(params) {
    return await axios({
      url: "/admin/ajax/userkey_diqu",
      method: "get",
      params,
    });
  },

  //自动发布获取地区
  async userkeydiqulist(params) {
    return await axios({
      url: "/admin/ajax/getCityList_qt",
      method: "get",
      params,
    });
  },

  //自动发布获取账号
  async userkeyzhuci(params) {
    return await axios({
      url: "/admin/ajax/userkey_zhuci",
      method: "get",
      params,
    });
  },
  //自动发布获取后缀
  async userkeyhz(params) {
    return await axios({
      url: "/admin/ajax/userkey_hz",
      method: "get",
      params,
    });
  },

  //自动发布获取后缀
  async account(params) {
    return await axios({
      url: "/admin/ajax/account",
      method: "get",
      params,
    });
  },

  //自动发布添加
  async automatiadd(data) {
    return await axios({
      url: "/admin/dsp.autotask/add",
      method: "post",
      data,
    });
  },

  //自动发布编辑
  async automatiexitadd(data) {
    return await axios({
      url: "/admin/dsp.autotask/edit?id=" + data.id,
      method: "post",
      data,
    });
  },

  //自动发布列表关键词添加
  async automatiadddhkey(data) {
    return await axios({
      url: "/admin/dsp.autotask/dhkey",
      method: "post",
      data,
    });
  },

  //自动发布列表关键词获取
  async automatigetdhkey(params) {
    return await axios({
      url: "/admin/ajax/dhkey",
      method: "get",
      params,
    });
  },

  //自动发布删除
  async automaticrdelete(params) {
    return await axios({
      url: "/admin/dsp.autotask/delete",
      method: "get",
      params,
    });
  },

  //自动发布编辑
  async automatiexit(params) {
    return await axios({
      url: "/admin/ajax/automatiexit",
      method: "get",
      params,
    });
  },

  // 地点搜索 keyword  city
  async wdsp_searchPlace(params) {
    return await axios({
      url: "/admin/ajax/getPoiList",
      method: "get",
      params,
    });
  },
  // 添加
  async wdsp_add(data) {
    return await axios({
      url: "/admin/dsp.video/add",
      method: "post",
      data,
    });
  },
  // 删除 id
  async wdsp_delete(data) {
    return await axios({
      url: "/admin/dsp.video/delete",
      method: "post",
      data,
    });
  },
  // 获取详情
  async wdsp_getDetailById(params) {
    return await axios({
      url: "/admin/dsp.video/edit",
      method: "get",
      params,
    });
  },
  // 编辑
  async wdsp_edit(data) {
    return await axios({
      url: "/admin/dsp.video/edit",
      method: "post",
      data,
    });
  },
  // 根据id获取视频模板
  async wdsp_getTmplById(params) {
    return await axios({
      url: "/admin/dsp.aivideo/add",
      method: "get",
      params,
    });
  },
  // 获取 关键词 type:keyword | @账号 type:auser 列表
  async wdsp_getKeywordOrUserList(data) {
    return await axios({
      url: "/admin/ajax/key_auser",
      method: "post",
      data,
    });
  },
  // 获取哔哩哔哩频道
  async wdsp_getChannelList(data) {
    return await axios({
      url: "/admin/ajax/getChannelList",
      method: "post",
      data,
    });
  },
  //  ---------------- 我的账号 --------------------------------
  // 列表
  async wdzh_getData(params) {
    return await axios({
      url: "/admin/dsp.account/mylist",
      method: "get",
      params,
    });
  },
  // 删除
  async wdzh_delete(data) {
    return await axios({
      url: "/admin/dsp.account/delete",
      method: "post",
      data,
    });
  },
  // 获取授权地址 |未添加的账号授权|
  async wdzh_add(data) {
    return await axios({
      url: "/admin/dsp.account/add.html",
      method: "post",
      data,
    });
  },
  // 获取授权地址 |已添加的账号授权|
  async wdzh_edit(data) {
    return await axios({
      url: "/admin/dsp.account/edit.html",
      method: "post",
      data,
    });
  },
  // 修改状态
  async wdzh_changeStatus(data) {
    return await axios({
      url: "/admin/dsp.account/modify",
      method: "post",
      data,
    });
  },
  // 粉丝列表
  async wdzh_getMyFans(params) {
    return await axios({
      url: "/admin/dsp.account/fans",
      method: "get",
      params,
    });
  },
  // 关注列表
  async wdzh_getMyFollow(params) {
    return await axios({
      url: "/admin/dsp.account/follow",
      method: "get",
      params,
    });
  },
  //  ---------------- 达人市场 -------------------------------
  // 获取行业分类列表
  async drsc_industryList(params) {
    return await axios({
      url: "/admin/ajax/getHangyeList",
      method: "get",
      params,
    });
  },
  async drsc_getData(params) {
    return await axios({
      url: "/admin/dsp.account/index",
      method: "get",
      params,
    });
  },
  //  ---------------- 精准获客 --------------------------------
  // 列表
  async jzhk_getData(params) {
    return await axios({
      url: "/admin/dsp.userkey/index",
      method: "get",
      params,
    });
  },
  // 删除
  async jzhk_delete(data) {
    return await axios({
      url: "/admin/dsp.userkey/delete",
      method: "post",
      data,
    });
  },
  // 修改状态
  async jzhk_changeStatus(data) {
    return await axios({
      url: "/admin/dsp.userkey/modify",
      method: "post",
      data,
    });
  },
  // 添加
  async jzhk_add(data) {
    return await axios({
      url: "/admin/dsp.userkey/add/type/keyword",
      method: "post",
      data,
    });
  },
  // 选择地区列表
  async jzhk_getCityList() {
    return await axios({
      url: "/admin/ajax/getCityList_qt",
      method: "get",
    });
  },
  // 排名词列表
  async jzhk_getKeywordList(params) {
    return await axios({
      url: "/admin/dsp.userkey/dhkey",
      method: "get",
      params,
    });
  },
  // 添加排名词
  async jzhk_addRankWords(data) {
    return await axios({
      url: "/admin/dsp.userkey/dhkey",
      method: "post",
      data,
    });
  },
  //  ---------------- 行业达人 --------------------------------
  // 列表
  async hydr_getData(params) {
    return await axios({
      url: "/admin/dsp.userkey/rival",
      method: "get",
      params,
    });
  },
  //修改状态
  async hydr_changeStatus(data) {
    return await axios({
      url: "/admin/dsp.userkey/modify",
      method: "post",
      data,
    });
  },
  //操作
  async hydr_delete(data) {
    return await axios({
      url: "/admin/dsp.userkey/delete",
      method: "post",
      data,
    });
  },
  //添加
  async hydr_add(data) {
    return await axios({
      url: "/admin/dsp.userkey/add/type/rival",
      method: "post",
      data,
    });
  },
  //  ---------------- 询盘线索 --------------------------------
  // 列表
  async xpxs_getData(params) {
    return await axios({
      url: "/admin/dsp.customer/index",
      methods: "get",
      params,
    });
  },
  //修改状态
  async xpxs_changeStatus(data) {
    return await axios({
      url: "/admin/dsp.customer/modify",
      method: "post",
      data,
    });
  },
  //二维码 查看
  async xpxs_barcode(params) {
    return await axios({
      url: "/index/qrcode/",
      method: "get",
      params,
    });
  },
  //回复
  async xpxs_scancodereply(data) {
    return await axios({
      url: "/admin/dsp.customer/reply",
      method: "post",
      data,
    });
  },
  //申诉
  async xpxs_appeal(data) {
    return await axios({
      url: "/admin/dsp.customer/index",
      method: "post",
      data,
    });
  },
  //---------------- 抖音热榜 --------------------------------
  async dyrb_getData(params) {
    return await axios({
      url: "/admin/dsp.hotdata/index",
      methods: "get",
      params,
    });
  },
  //  ---------------- 拓客粉丝 --------------------------------
  async tkfs_getData(params) {
    return await axios({
      url: "/admin/dsp.userfans/index",
      method: "get",
      params,
    });
  },

  //  ---------------- 获取token --------------------------------
  async addtoken() {
    return await axios({
      url: "/admin/ajax/getEditorToken",
      method: "post",
    });
  },

  //  ---------------- Ai视频列表 --------------------------------
  async Aivideo_video(data) {
    return await axios({
      url: "/ice/getTemplates?token=6675baaab3d787e0819573eebe12c0e6",
      method: "post",
      data,
    });
  },
};
